package com.tencreat.domain.mall.dto;

import com.tencreat.common.core.domain.model.ReqPageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

/**
 * @author tang jun liang
 * @version 1.0
 * @date 2021/9/6 14:27
 * 店铺搜索
 */

@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "店铺商品列表")
public class MallStoreGoodsSearchDTO extends ReqPageParam implements Serializable {

    @ApiModelProperty(value = "分类 0 美食;1 医疗 ")
    private Long type;

    @ApiModelProperty(value = "二级分类id")
    private Integer twoCategoryId;

    @ApiModelProperty(value = "搜索关键词")
    private String keyWord;

    @ApiModelProperty(value = "搜索类型 default:智能默认,lowPrice:低价,sales:销量,store :店铺,distance: 距离,goods:商品,star：评分")
    private String searchType;

    @ApiModelProperty(value = "分类集合")
    private List<Long> categoryIds;


    @ApiModelProperty(value = "推荐商品")
    private Boolean isHot;


    public Integer getTwoCategoryId() {
        if(twoCategoryId == null){
            return 0;
        }
        return twoCategoryId;
    }

    public void setTwoCategoryId(Integer twoCategoryId) {
        this.twoCategoryId =  twoCategoryId == null ? 0 : twoCategoryId;
    }

    public Long getType() {
        if(twoCategoryId == null){
            return 0L;
        }
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    public String getSearchType() {
        return searchType;
    }

    public void setSearchType(String searchType) {
        this.searchType = searchType;
    }

    public Boolean getHot() {
        return isHot;
    }

    public void setHot(Boolean hot) {
        isHot = hot;
    }
}
